package com.soup.lab.tools.faker.source;

import java.net.URL;
import java.nio.charset.Charset;

public class URLReaderSource extends URLStreamSource implements ReaderSource {

    private final Charset charset;

    public URLReaderSource(URL url) {
        this(url, Charset.defaultCharset());
    }

    public URLReaderSource(String url) {
        this(url, Charset.defaultCharset());
    }

    public URLReaderSource(URL url, Charset charset) {
        super(url);
        this.charset = charset;
    }

    public URLReaderSource(String url, Charset charset) {
        super(url);
        this.charset = charset;
    }

    @Override
    public Charset getCharset() {
        return charset;
    }
}
